package com.cari.oa.domain;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

@Entity
@Table(name="T_CUSTOMER_CONTACT")
public class CustomerContactEntity implements Serializable{
	private static final long serialVersionUID = 6208192021551018005L;
	
	private String id;
	private String name;
	private String province;
	private String post;
	private String company;
	private String phone;
	private String mobile;
	private String email;
	private String qq;
	private Timestamp createTime;
	private String remark;
	
	@Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@NotNull(message = "客户联系人名称不能为空")
    @Length(max = 32, message = "客户联系人名称长度要小于32个字符")
    @Column(name = "name")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Length(max = 32, message = "客户联系人省份长度要小于32个字符")
    @Column(name = "PROVINCE")
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	
	@Length(max = 32, message = "客户联系人职位长度要小于32个字符")
    @Column(name = "POST")
	public String getPost() {
		return post;
	}
	public void setPost(String post) {
		this.post = post;
	}
	
	@Length(max = 32, message = "客户联系人固话长度要小于32个字符")
    @Column(name = "PHONE")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(max = 100, message="联系人公司名称长度不能超过100字符")
	@Column(name="COMPANY")
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	@Length(max = 32, message = "客户联系人移动电话长度要小于32个字符")
    @Column(name = "MOBILE")
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@Length(max = 32, message = "客户联系人邮箱长度要小于32个字符")
    @Column(name = "EMAIL")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	@Length(max = 32, message = "客户联系人QQ长度要小于32个字符")
    @Column(name = "QQ")
	public String getQq() {
		return qq;
	}
	public void setQq(String qq) {
		this.qq = qq;
	}
	
    @Column(name = "CREATETIME")
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	
	@Length(max = 32, message = "备注信息长度要小于32个字符")
    @Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}
